<link rel="stylesheet" href="{{ getAssets }}css/retail.css?v={{ assets_version }}">
<style>
.widget-title{ font-weight: bold; position: relative; padding-left: 10px;}
.widget-title:before {content: "";display: block;width: 2px; height:15px;background: #a2c4f4;position: absolute;left: 0;top: 6px;}
</style>
<input type="hidden" value="0" name="archives_id" id="archives_id">
<div class="yanguang">
    <div class="userinfo-bar">
        <div class="am-g doc-am-g">
            <div class="am-u-sm-12 am-u-md-6 am-u-lg-4 am-cf am-monospace" style="line-height: 40px;">
                <div class="am-fl" style="color: #000; font-weight: bold;">
                    <span class="am-text-xs am-badge am-badge-primary am-round" id="sex">-</span>
                    <span class="am-text-xl" id="realname">-</span>
                </div>
                <div class="am-fl am-margin-left-sm am-text-xs"  style="line-height: 20px;">
                    <div id="mobile">-</div>
                    <div id="birthday">-</div>
                </div>
            </div>
            <div class="am-u-sm-12 am-u-md-6 am-u-lg-4"></div>
            <div class="am-u-sm-12 am-u-md-6 am-u-lg-4 am-text-right">
                <!--<a href="javascript:;" class="am-btn am-btn-default am-round am-btn-sm" id="editarchives">修改资料</a>
                <a href="javascript:;"  class="am-btn am-btn-default am-round am-btn-sm" id="addarchives">新增资料</a>-->
                <a type="button" class="am-btn am-btn-secondary am-round am-btn-sm" id="rechange">切换会员</a>
            </div>
        </div>
    </div>
    <div class="historybar">
        <ul>
            <li data-day="today"><a href="javascript:void(0);" class="active">今天</a></li>
            <li data-day="more"><a href="javascript:void(0);"><i class="am-icon-plus"></i> 更多</a></li>
        </ul>
    </div>
    <div class="yg-info" data-day="today">
        <div class="chufang">
            <div class="title am-cf">
                <ul class="tab-lei am-cf">
                    <li><a href="javascript:void(0);" data-type="far" data-tid="today" class="active">远用处方</a></li>
                    <li><a href="javascript:void(0);" data-type="near" data-tid="today">近用处方</a></li>
                    <li><a href="javascript:void(0);" data-type="yinxing" data-tid="today">隐形处方</a></li>
                    <li><a href="javascript:void(0);" data-type="duojiaodian" data-tid="today">多焦点处方</a></li>
                </ul>
            </div>
            <div class="datatable-shili" data-type="far" copy="false" saved="false">
                <div class="info-bar list-head am-cf">
                    <div class="item" style="width:11%">球镜</div>
                    <div class="item" style="width:11%">柱镜</div>
                    <div class="item" style="width:11%">轴位</div>
                    <div class="item" style="width:11%">瞳距(mm)</div>
                    <div class="item" style="width:11%">瞳高(mm)</div>
                    <div class="item" style="width:11%">裸眼视力</div>
                    <div class="item" style="width:11%">矫正视力</div>
                    <div class="item" style="width:11%">棱镜</div>
                    <div class="item" style="width:11%">基底</div>
                </div>
                <div class="info-bar red-bg am-cf" data-type="right">
                    <div class="item" data-type="sph" style="width:11%" contenteditable="true">&nbsp;</div>
                    <div class="item" data-type="cyl" style="width:11%" contenteditable="true">&nbsp;</div>
                    <div class="item" data-type="axial_view" style="width:11%" contenteditable="true">&nbsp;</div>
                    <div class="item" data-type="pd_yuan" style="width:11%" contenteditable="true">&nbsp;</div>
                    <div class="item" data-type="mrp" style="width:11%" contenteditable="true">&nbsp;</div>
                    <div class="item" data-type="nv" style="width:11%" contenteditable="true">&nbsp;</div>
                    <div class="item" data-type="cv" style="width:11%" contenteditable="true">&nbsp;</div>
                    <div class="item" data-type="v" style="width:11%" contenteditable="true">&nbsp;</div>
                    <div class="item" data-type="bc" style="width:11%" contenteditable="true">&nbsp;</div>
                    <span class="type red">右眼</span>
                </div>
                <div class="info-bar blue-bg am-cf" style="margin-bottom: 20px;" data-type="left">
                    <div class="item" data-type="sph" style="width:11%" contenteditable="true">&nbsp;</div>
                    <div class="item" data-type="cyl" style="width:11%" contenteditable="true">&nbsp;</div>
                    <div class="item" data-type="axial_view" style="width:11%" contenteditable="true">&nbsp;</div>
                    <div class="item" data-type="pd_yuan" style="width:11%" contenteditable="true">&nbsp;</div>
                    <div class="item" data-type="mrp" style="width:11%" contenteditable="true">&nbsp;</div>
                    <div class="item" data-type="nv" style="width:11%" contenteditable="true">&nbsp;</div>
                    <div class="item" data-type="cv" style="width:11%" contenteditable="true">&nbsp;</div>
                    <div class="item" data-type="v" style="width:11%" contenteditable="true">&nbsp;</div>
                    <div class="item" data-type="bc" style="width:11%" contenteditable="true">&nbsp;</div>
                    <span class="type blue">左眼</span>
                </div>
                <div class="info-bar define-row col4 am-cf">
                    <div class="item"><div class="pmr" data-type="total_pd_yuan"><span>总远用瞳距:</span><em></em>mm</div></div>
                </div>
                <a class="clear-btn" href="javascript:void(0);"><i class="am-icon-trash-o"></i>清除</a>
            </div>
            <div class="datatable-shili" data-type="near" copy="false" saved="false" style="display: none;">
                <div class="info-bar list-head am-cf">
                    <div class="item" style="width:11%">球镜</div>
                    <div class="item" style="width:11%">柱镜</div>
                    <div class="item" style="width:11%">轴位</div>
                    <div class="item" style="width:11%">瞳距(mm)</div>
                    <div class="item" style="width:11%">瞳高(mm)</div>
                    <div class="item" style="width:11%">裸眼视力</div>
                    <div class="item" style="width:11%">矫正视力</div>
                    <div class="item" style="width:11%">棱镜</div>
                    <div class="item" style="width:11%">基底</div>
                </div>
                <div class="info-bar red-bg am-cf" data-type="right">
                    <div class="item" data-type="sph" style="width:11%" contenteditable="true">&nbsp;</div>
                    <div class="item" data-type="cyl" style="width:11%" contenteditable="true">&nbsp;</div>
                    <div class="item" data-type="axial_view" style="width:11%" contenteditable="true">&nbsp;</div>
                    <div class="item" data-type="pd_jin" style="width:11%" contenteditable="true">&nbsp;</div>
                    <div class="item" data-type="mrp" style="width:11%" contenteditable="true">&nbsp;</div>
                    <div class="item" data-type="nv" style="width:11%" contenteditable="true">&nbsp;</div>
                    <div class="item" data-type="cv" style="width:11%" contenteditable="true">&nbsp;</div>
                    <div class="item" data-type="v" style="width:11%" contenteditable="true">&nbsp;</div>
                    <div class="item" data-type="bc" style="width:11%" contenteditable="true">&nbsp;</div>
                    <span class="type red">右眼</span>
                </div>
                <div class="info-bar blue-bg am-cf" style="margin-bottom: 20px;" data-type="left">
                    <div class="item" data-type="sph" style="width:11%" contenteditable="true">&nbsp;</div>
                    <div class="item" data-type="cyl" style="width:11%" contenteditable="true">&nbsp;</div>
                    <div class="item" data-type="axial_view" style="width:11%" contenteditable="true">&nbsp;</div>
                    <div class="item" data-type="pd_jin" style="width:11%" contenteditable="true">&nbsp;</div>
                    <div class="item" data-type="mrp" style="width:11%" contenteditable="true">&nbsp;</div>
                    <div class="item" data-type="nv" style="width:11%" contenteditable="true">&nbsp;</div>
                    <div class="item" data-type="cv" style="width:11%" contenteditable="true">&nbsp;</div>
                    <div class="item" data-type="v" style="width:11%" contenteditable="true">&nbsp;</div>
                    <div class="item" data-type="bc" style="width:11%" contenteditable="true">&nbsp;</div>
                    <span class="type blue">左眼</span>
                </div>
                <div class="info-bar define-row col4 am-cf">
                    <div class="item"><div class="pmr" data-type="total_pd_jin"><span>总近用瞳距:</span><em></em>mm</div></div>
                </div>
                <a class="clear-btn" href="javascript:void(0);"><i class="am-icon-trash-o"></i>清除</a>
            </div>
            <div class="datatable-shili" data-type="yinxing" copy="false" saved="false" style="display: none;">
                <div class="info-bar list-head am-cf">
                    <div class="item" style="width:11%">球镜</div>
                    <div class="item" style="width:11%">柱镜</div>
                    <div class="item" style="width:11%">轴位</div>
                    <div class="item" style="width:11%">瞳距(mm)</div>
                    <div class="item" style="width:11%">瞳高(mm)</div>
                    <div class="item" style="width:11%">裸眼视力</div>
                    <div class="item" style="width:11%">矫正视力</div>
                    <div class="item" style="width:11%">直径</div>
                    <div class="item" style="width:11%">基弧</div>
                </div>
                <div class="info-bar red-bg am-cf" data-type="right">
                    <div class="item" data-type="sph" style="width:11%" contenteditable="true">&nbsp;</div>
                    <div class="item" data-type="cyl" style="width:11%" contenteditable="true">&nbsp;</div>
                    <div class="item" data-type="axial_view" style="width:11%" contenteditable="true">&nbsp;</div>
                    <div class="item" data-type="pd_jin" style="width:11%" contenteditable="true">&nbsp;</div>
                    <div class="item" data-type="mrp" style="width:11%" contenteditable="true">&nbsp;</div>
                    <div class="item" data-type="nv" style="width:11%" contenteditable="true">&nbsp;</div>
                    <div class="item" data-type="cv" style="width:11%" contenteditable="true">&nbsp;</div>
                    <div class="item" data-type="diameter" style="width:11%" contenteditable="true">&nbsp;</div>
                    <div class="item" data-type="base_curve" style="width:11%" contenteditable="true">&nbsp;</div>
                    <span class="type red">右眼</span>
                </div>
                <div class="info-bar blue-bg am-cf" data-type="left" style="margin-bottom: 20px;">
                    <div class="item" data-type="sph" style="width:11%" contenteditable="true">&nbsp;</div>
                    <div class="item" data-type="cyl" style="width:11%" contenteditable="true">&nbsp;</div>
                    <div class="item" data-type="axial_view" style="width:11%" contenteditable="true">&nbsp;</div>
                    <div class="item" data-type="pd_jin" style="width:11%" contenteditable="true">&nbsp;</div>
                    <div class="item" data-type="mrp" style="width:11%" contenteditable="true">&nbsp;</div>
                    <div class="item" data-type="nv" style="width:11%" contenteditable="true">&nbsp;</div>
                    <div class="item" data-type="cv" style="width:11%" contenteditable="true">&nbsp;</div>
                    <div class="item" data-type="diameter" style="width:11%" contenteditable="true">&nbsp;</div>
                    <div class="item" data-type="base_curve" style="width:11%" contenteditable="true">&nbsp;</div>
                    <span class="type blue">左眼</span>
                </div>
                <a class="clear-btn" href="javascript:void(0);"><i class="am-icon-trash-o"></i>清除</a>
            </div>
            <div class="datatable-shili" data-type="duojiaodian"  copy="false" saved="false" style="display: none;">
                <div class="info-bar list-head am-cf"  >
                    <div class="item" style="width:8.3%">球镜</div>
                    <div class="item" style="width:8.3%">柱镜</div>
                    <div class="item" style="width:8.3%">轴位</div>
                    <div class="item" style="width:8.3%">近瞳距(mm)</div>
                    <div class="item" style="width:8.3%">远瞳距(mm)</div>
                    <div class="item" style="width:8.3%">瞳高(mm)</div>
                    <div class="item" style="width:8.3%">裸眼视力</div>
                    <div class="item" style="width:8.3%">矫正视力</div>
                    <div class="item" style="width:8.3%">ADD</div>
                    <div class="item" style="width:8.3%">通道</div>
                    <div class="item" style="width:8.3%">棱镜</div>
                    <div class="item" style="width:8.3%">基底</div>
                </div>
                <div class="info-bar red-bg am-cf" data-type="right">
                    <div class="item" data-type="sph" style="width:8.3%" contenteditable="true">&nbsp;</div>
                    <div class="item" data-type="cyl" style="width:8.3%" contenteditable="true">&nbsp;</div>
                    <div class="item" data-type="axial_view" style="width:8.3%" contenteditable="true">&nbsp;</div>
                    <div class="item" data-type="pd_jin" style="width:8.3%" contenteditable="true">&nbsp;</div>
                    <div class="item" data-type="pd_yuan" style="width:8.3%" contenteditable="true">&nbsp;</div>
                    <div class="item" data-type="mrp" style="width:8.3%" contenteditable="true">&nbsp;</div>
                    <div class="item" data-type="nv" style="width:8.3%" contenteditable="true">&nbsp;</div>
                    <div class="item" data-type="cv" style="width:8.3%" contenteditable="true">&nbsp;</div>
                    <div class="item" data-type="add_info" style="width:8.3%" contenteditable="true">&nbsp;</div>
                    <div class="item" data-type="pass" style="width:8.3%" contenteditable="true">&nbsp;</div>
                    <div class="item" data-type="v" style="width:8.3%" contenteditable="true">&nbsp;</div>
                    <div class="item" data-type="bc" style="width:8.3%" contenteditable="true">&nbsp;</div>
                    <span class="type red">右眼</span>
                </div>
                <div class="info-bar blue-bg am-cf" style="margin-bottom: 20px;"  data-type="left">
                    <div class="item" data-type="sph" style="width:8.3%" contenteditable="true">&nbsp;</div>
                    <div class="item" data-type="cyl" style="width:8.3%" contenteditable="true">&nbsp;</div>
                    <div class="item" data-type="axial_view" style="width:8.3%" contenteditable="true">&nbsp;</div>
                    <div class="item" data-type="pd_jin" style="width:8.3%" contenteditable="true">&nbsp;</div>
                    <div class="item" data-type="pd_yuan" style="width:8.3%" contenteditable="true">&nbsp;</div>
                    <div class="item" data-type="mrp" style="width:8.3%" contenteditable="true">&nbsp;</div>
                    <div class="item" data-type="nv" style="width:8.3%" contenteditable="true">&nbsp;</div>
                    <div class="item" data-type="cv" style="width:8.3%" contenteditable="true">&nbsp;</div>
                    <div class="item" data-type="add_info" style="width:8.3%" contenteditable="true">&nbsp;</div>
                    <div class="item" data-type="pass" style="width:8.3%" contenteditable="true">&nbsp;</div>
                    <div class="item" data-type="v" style="width:8.3%" contenteditable="true">&nbsp;</div>
                    <div class="item" data-type="bc" style="width:8.3%" contenteditable="true">&nbsp;</div>
                    <span class="type blue">左眼</span>
                </div>
                <div class="info-bar define-row col4 am-cf">
                    <div class="item"><div class="pmr" data-type="total_pd_jin"><span>总近用瞳距:</span><em></em>mm</div></div>
                    <div class="item"><div class="pmr" data-type="total_pd_yuan"><span>总远用瞳距:</span><em></em>mm</div></div>
                </div>
                <a class="clear-btn" href="javascript:void(0);"><i class="am-icon-trash-o"></i>清除</a>
            </div>
        </div>
        <div class="form-bar am-form query-form am-cf">
            <div class="am-u-sm-3">
                <label class="am-u-sm-3 am-form-label">医生</label>
                <div class="am-u-sm-9 doctor">
                    <select class="am-input-sm" name="doctor" id="doctor">
                        {{range $k, $v := .c.doctor}}
                            <option value="{{$v.OptionName}}">{{$v.Pinyin}} | {{$v.OptionName}}</option>
                        {{end}}
                    </select>
                </div>
            </div>
            <div class="am-u-sm-3">
                <label class="am-u-sm-3 am-form-label">验光师</label>
                <div class="am-u-sm-9 optist">
                    <select class="am-input-sm" name="optometrist" id="optometrist" >
                        <option value=""></option>
                        {{range $k, $v := .c.optometrist}}
                            <option value="{{$v.OptionName}}">{{$v.Pinyin}} | {{$v.OptionName}}</option>
                        {{end}}
                    </select>
                </div>
            </div>
            <div class="am-u-sm-6">
                <label class="am-u-sm-3 am-form-label">备注</label>
                <div class="am-u-sm-9 remarks">
                    <input name="optremark" type="text" id="optremark"  />
                </div>
            </div>
        </div>
    </div>
</div>

<div class="widget am-cf" style="margin-top: 20px;border-radius:0; box-shadow: none;">
    <div class="widget-head am-cf">
        <div class="widget-title  am-fl" data-type="goods_number">选择商品(0)</div>
        <div class="widget-function am-fr">
            <a href='javascript:;' class="am-btn am-btn-default am-btn-warning am-round" id="add_new_goods">添加商品</a>
            <a href="javascript:;" class="am-btn am-btn-default am-btn-warning am-round" id="add_custom_goods">商品定制</a>
            <a href='javascript:;' class="am-btn am-btn-default am-btn-warning am-round" id="add_hisoty_goods">历史销售商品</a>
        </div>
    </div>
    <div class="widget-body  am-fr">
        <div class="goodsList">
            <div class="goodsinfo">
                <div class="title">
                    <div class="goodsrow">
                        <div class="item good-name">商品信息</div>
                        <div class="item good-form">&nbsp;</div>
                        <div class="item good-par b">&nbsp;</div>
                        <div class="item good-price">零售价</div>
                        <div class="item good-form">数量</div>
                        <div class="item good-form">折扣%</div>
                        <div class="item good-form">单价</div>
                        <div class="item good-form">小计</div>
                        <div class="item good-btn">&nbsp;</div>
                    </div>
                </div>
                <div class="contents" id="goodslist" style="padding-bottom: 30px;">
                    <div class="goodsrow" style="display:none;" template="template">
                        <div class="item good-name"></div>
                        <div class="item good-form"><span class="customize-tips" style="display:inline-block;">定制</span>
                        </div>
                        <div class="item good-par b"></div>
                        <div class="item good-price b am-text-danger"></div>
                        <div class="item good-form">
                            <div class="num">
                                <input name="sale_num" autocomplete="off" type="text" onblur="change_sale_num(this,'ipt')">
                                <button onclick="change_sale_num(this,'sub')">-</button>
                                <button onclick="change_sale_num(this,'add')">+</button>
                            </div>
                        </div>
                        <div class="item good-form">
                            <input name="discount" type="text" autocomplete="off" onchange="changeDiscount(this)">
                        </div>
                        <div class="item good-form">
                            <input name="single_price" type="text" autocomplete="off" onchange="changeSinglePrice(this)">
                        </div>
                        <div class="item good-form">
                            <input name="subtotal" type="text" autocomplete="off" readonly="readonly">
                        </div>
                        <div class="item good-btn"><a href="javascript:void(0);" onclick="deleteGoods(this)"><i class="am-icon-trash-o"></i></a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<div class="widget am-cf" style="margin-top: 20px;border-radius:0; box-shadow: none;">
    <div class="widget-head am-cf">
        <div class="widget-title  am-fl">结算清单</div>
    </div>
    <div class="widget-body  am-fr query-form balance-info">
        <div class="formline basic">
            <div class="field"><label>零售金额：</label><span>￥0</span></div>
            <div class="field" style="display: none;"><input type="text" name="sell_total_price"/></div>
            <div class="field" style="display: none;"><label></label><input type="text" name="total_price" /></div>
            <div class="field" style="display: none;"><label></label><input type="text" name="total_real_price" /></div>
            <div class="field"><label>优惠金额：</label><span>￥0</span></div>
            <div class="field" style="display: none;"><input type="text" name="preferential_total_price"/></div>
            <label style="padding-left:45px;">配镜顾问：</label>
            <div class="field" >

                <div class="cols1 nolabel">
                    <div class="control-content">
                        <select class="form-control" name="business_id" style="height:30px;width:100px;">
                            <option value=""></option>
                            {{range $k, $v := .c.business}}
                                <option value="{{$v.OptionName}}">{{$v.Pinyin}} | {{$v.OptionName}}</option>
                            {{end}}
                        </select>
                    </div>
                </div>

            </div>
        </div>
        <div class="formline" >
            <div class="field"><label>单据备注：</label><input name="remark" style="width:400px; margin-left:5px" type="text" placeholder="请填写单据备注信息"/>
            </div>
        </div>
        <div class="formline">
            <div class="field"><label>取货方式：</label>
                <div class="lable-select">
                    <a class="active" href="javascript:void(0);" pick_up_type="1" onclick="changePickType(this)">现场取货</a>
                    <a href="javascript:void(0);" pick_up_type="2" onclick="changePickType(this)">邮递取货</a>
                    <a href="javascript:void(0);" pick_up_type="3" onclick="changePickType(this)">指定时间取货</a>
                </div>
            </div>
        </div>
        <div class="formline" style="display: none;">
            <div class="field"><label>邮递取货地址</label><input name="address_name" style="width:600px;" class="am-margin-left-sm" type="text" />
            </div>
        </div>
        <div class="formline am-cf" style="display: none;" >
            <label class="control-label am-fl">预计取镜时间</label><div class="control-content am-fl am-margin-left-sm"><input type="text" class="form-control" data-am-datepicker name="hope_pick_up_time"  style="width:200px;"></div>
        </div>
    </div>
    <div class="summary-bar">应收金额<span>￥0</span><a href="javascript:void(0);" id="comfirm_sales" onclick="save()">确认下单</a></div>
</div>
